import request from '@/utils/request'

// 查询周边景点列表
export function listSpots(query) {
  return request({
    url: '/camp/spots/list',
    method: 'get',
    params: query
  })
}

// 查询周边景点详细
export function getSpots(scenicId) {
  return request({
    url: '/camp/spots/' + scenicId,
    method: 'get'
  })
}

// 新增周边景点
export function addSpots(data) {
  return request({
    url: '/camp/spots',
    method: 'post',
    data: data
  })
}

// 修改周边景点
export function updateSpots(data) {
  return request({
    url: '/camp/spots',
    method: 'put',
    data: data
  })
}

// 删除周边景点
export function delSpots(scenicId) {
  return request({
    url: '/camp/spots/' + scenicId,
    method: 'delete'
  })
}

// 景点审核
  export function approveSpots(query) {
    return request({
      url: '/camp/spots/approve',
      method: 'put',
      data:query
    })
}
